﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/mobile_H.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Count
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <style type="text/css">
        input.ui-input-text
        {
            height: 25px;
            background-color: #FFF;
            border: 1px solid #bbbbbb;
            -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3) inset;
            -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3) inset;
            box-shadow: 0 1px 3px rgba(0,0,0,0.3) inset;
            width: 95%;
        }
        
        .hide
        {
            display: none;
        }
        tr
        {
            height: 35px;
            text-align: right;
            background-color: #fff;
        }
        tr.dis
        {
            background-color: #FFFFC2;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
    <div style="background-color: #8094AE; height: 50px; margin-top: 0px;">
        <h2 style="color: White; vertical-align: middle;">
            &nbsp;COUNT</h2>
    </div>
    <div id="page1">
        <table style="width: 100%; font-size: medium; color: #004080; padding: 5px; font-weight: bold;">
            <tr class="dis">
                <td style="width: 30%; text-align: right;">
                    DATE : &nbsp;
                </td>
                <td style="text-align: left;">
                    &nbsp;&nbsp;
                    <%= WinNemoLib.DateUtil.ToDisplayDate(DateTime.Now) %>
                </td>
            </tr>
            <tr class="dis">
                <td>
                    EMP : &nbsp;
                </td>
                <td style="text-align: left;"> &nbsp;&nbsp; <%= User.Identity.Name.ToString() %>
                </td>
            </tr>

            <tr id="area" >
                <td>
                   Area  : &nbsp;
                </td>
                <td style="text-align: left;">
                    <input type="text" class="ui-input-text"  />
                </td>
            </tr>
        </table>
        <input type="button" id="back" value="Back" style="width: 50%" />
        
    </div>
  
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptsSection" runat="server">

    <% if (false)
       { %>
    <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    <% } %>
    <script type="text/jscript">

        $(function () {
          
            $("input.ui-input-text").keypress(function (evt) {
                evt = (evt) ? evt : (window.event) ? event : null;
                if (evt) {
                    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
                    //                    $("#log").html($("#log").html() + charCode);
                    if (charCode == 13) {
                        if ($("input.ui-input-text").val() == "") {
                            alert("Input Data");
                            return;
                        }

                        window.location = '<%= Url.Action("Cart_Tag") %>' + '?area=' + $("input.ui-input-text").val();
                    }
                }
            });

            $("input.ui-input-text").keydown(function (evt) {
                if (evt.keyCode == 13) {
                    if ($("input.ui-input-text").val() == "") {
                        alert("Input Data");
                        return;
                    }

                    window.location = '<%= Url.Action("Cart_Tag") %>' + '?area=' + $("input.ui-input-text").val();
                }
            });

            $("#back").click(function () {
                var last = $("input.ui-input-text").parent().parent().parent().find("tr:last");

                if (last.attr("id") == "area") {
                    window.location = '<%=  Url.Action("Index")  %>'
                }
                if (last.attr("id") == "Cart") {
                    window.location = '<%= Url.Action("Count") %>'
                    return;
                }
            });
            $("input.ui-input-text").focus();

        });
    </script>
</asp:Content>
